package com.settlement.system.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.settlement.system.common.annotation.StorePermission;
import com.settlement.system.model.entity.TbOrder;
import com.settlement.system.model.entity.YzBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.settlement.system.model.query.TbOrderPageQuery;
import com.settlement.system.model.query.YzBillPageQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* <p>
* 有赞账单表 Mapper 接口
* </p>
*
* @author huangrensen
* @since 2023-10-23
*/
@Mapper
public interface YzBillMapper extends BaseMapper<YzBill> {

    /**
     * 创建表
     * @param tableName
     * @return
     */
    int createTable(@Param("tableName")String tableName);

    /**
    * 插入数据
    *
    * @param yzBill 实体
    * @return
    */
    int insertData(YzBill yzBill);

    /**
    * 更新数据
    *
    * @param yzBill 实体
    * @return
    */
    int update(YzBill yzBill);

    /**
    * 查询数据
    *
    * @param queryParams 查询类
    * @return
    */
    List<YzBill> getList(YzBillPageQuery queryParams);

    /**
     * 是否存在表
     * @param tableName
     * @return
     */
    String existTable(@Param("tableName")String tableName);

    @StorePermission
    Page<YzBill> getPage(Page<YzBill> page, YzBillPageQuery queryParams);
}
